<template>
  <XtxBread>
    <XtxBreadItem to="/">首页</XtxBreadItem>
    <XtxBreadItem :to="`/category/${subFilter.parentId}`">{{subFilter.parentName}}</XtxBreadItem>
    <transition name="fade-right" mode="out-in">
    <XtxBreadItem :key="subFilter.name">{{subFilter.name}}</XtxBreadItem>
    </transition>
  </XtxBread>
</template>

<script>
import { inject } from 'vue'
export default {
  name: 'SubBread',
  setup () {
    const subFilter = inject('subFilter')
    return { subFilter }
  }
}
</script>
